//
//  ByNetBase.h
//  beibei_ios
//
//  Created by hebidu on 16/4/15.
//  Copyright © 2016年 hebidu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "ByNetBaseResult.h"

typedef enum : NSUInteger {
    ByNetDataTypeString,
    ByNetDataTypeArray,
    ByNetDataTypeDictionary,
} ByNetDataType;

@interface ByNetBaseApi : NSObject


// 基本post请求
+ (void)post:(NSString *)requestId
     apiType:(NSString *)type
    dataType:(ByNetDataType)dataType
   apiVerson:(NSInteger)ver
      params:(NSDictionary *)params
     success:(void(^)(NSURLSessionDataTask *operation, id result, NSString *notifyID))success
     failure:(void(^)(NSURLSessionDataTask *operation, NSError *error))failure;

// 上传多个图片
+ (void)uploadImages:(NSArray *)images
                type:(NSString *)type
             success:(void(^)(NSArray *success))success
             failure:(void(^)(NSURLSessionDataTask *operation, NSError *error))failure;

// 上传单个图片（头像）
+ (void)uploadImage:(UIImage *)image
               type:(NSString *)type
            success:(void(^)(NSArray *success))success
            failure:(void(^)(NSURLSessionDataTask *operation, NSError *error))failure;

@end
